Optimal. Leaf size=27 \[ -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {65, 212}
\begin {gather*} -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx &=-\frac {2 \text {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\sqrt {1-a x}\right )}{a}\\ &=-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 27, normalized size = 1.00 \begin {gather*} -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.48, size = 23, normalized size = 0.85
method | result | size |
derivativedivides | \(-\frac {\arctanh \left (\frac {\sqrt {-a x +1}\, \sqrt {2}}{2}\right ) \sqrt {2}}{a}\) | \(23\) |
default | \(-\frac {\arctanh \left (\frac {\sqrt {-a x +1}\, \sqrt {2}}{2}\right ) \sqrt {2}}{a}\) | \(23\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 39, normalized size = 1.44 \begin {gather*} \frac {\sqrt {2} \log \left (-\frac {\sqrt {2} - \sqrt {-a x + 1}}{\sqrt {2} + \sqrt {-a x + 1}}\right )}{2 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.20, size = 35, normalized size = 1.30 \begin {gather*} \frac {\sqrt {2} \log \left (\frac {a x + 2 \, \sqrt {2} \sqrt {-a x + 1} - 3}{a x + 1}\right )}{2 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 65 vs.
\(2 (24) = 48\).
time = 2.60, size = 65, normalized size = 2.41 \begin {gather*} \begin {cases} \frac {2 \left (\begin {cases} - \frac {\sqrt {2} \operatorname {acoth}{\left (\frac {\sqrt {2}}{\sqrt {- a x + 1}} \right )}}{2} & \text {for}\: \frac {1}{- a x + 1} > \frac {1}{2} \\- \frac {\sqrt {2} \operatorname {atanh}{\left (\frac {\sqrt {2}}{\sqrt {- a x + 1}} \right )}}{2} & \text {for}\: \frac {1}{- a x + 1} < \frac {1}{2} \end {cases}\right )}{a} & \text {for}\: a \neq 0 \\x & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.81, size = 42, normalized size = 1.56 \begin {gather*} \frac {\sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 2 \, \sqrt {-a x + 1} \right |}}{2 \, {\left (\sqrt {2} + \sqrt {-a x + 1}\right )}}\right )}{2 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.47, size = 19, normalized size = 0.70 \begin {gather*} -\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2-2\,a\,x}}{2}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________